package ljc;

import javax.servlet.*;
import javax.servlet.http.*;
import java.io.IOException;
import java.io.PrintWriter;
public class textServlet extends HttpServlet {
    @Override
    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        String name=request.getParameter("username");
        PrintWriter writer= response.getWriter();
        writer.println(name);
    }

    @Override
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
            PrintWriter writer= response.getWriter();
            writer.println("11111");
            writer.println(this);
    }
    public void destroy(){
        System.out.println("destory......");
    }
}
